home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 551-575 / disk_570 / gadtoolsbox / source / source.lha / GTEd.h < prev    next >
C/C++ Source or Header  |  1991-11-04  |  9KB  |  233 lines

  1. /*-- AutoRev header do NOT edit!
  2. *
  3. *   Program         :   GTEd.h
  4. *   Copyright       :   © Copyright 1991 Jaba Development
  5. *   Author          :   Jan van den Baard
  6. *   Creation Date   :   21-Sep-91
  7. *   Current version :   1.00
  8. *   Translator      :   DICE v2.6
  9. *
  10. *   REVISION HISTORY
  11. *
  12. *   Date          Version         Comment
  13. *   ---------     -------         ------------------------------------------
  14. *   21-Sep-91     1.00            Header with very important definitions.
  15. *
  16. *-- REV_END --*/
  17.  
  18. #include <exec/types.h>
  19. #include <exec/memory.h>
  20. #include <dos/dos.h>
  21. #include <dos/dostags.h>
  22. #include <dos/rdargs.h>
  23. #include <libraries/nofrag.h>
  24. #include <libraries/commodities.h>
  25. #include <libraries/gadtools.h>
  26. #include <libraries/asl.h>
  27. #include <intuition/intuition.h>
  28. #include <intuition/gadgetclass.h>
  29. #include <intuition/sghooks.h>
  30. #include <graphics/gfx.h>
  31. #include <workbench/workbench.h>
  32. #include <workbench/startup.h>
  33. #include <workbench/icon.h>
  34. #ifndef abs
  35. #define abs
  36. #endif
  37. #include <stdarg.h>
  38. #include <stdlib.h>
  39. #include <string.h>
  40.  
  41. #include <clib/alib_protos.h>
  42. #include <clib/exec_protos.h>
  43. #include <clib/dos_protos.h>
  44. #include <clib/nofrag_protos.h>
  45. #include <clib/commodities_protos.h>
  46. #include <clib/gadtools_protos.h>
  47. #include <clib/asl_protos.h>
  48. #include <clib/intuition_protos.h>
  49. #include <clib/graphics_protos.h>
  50. #include <clib/utility_protos.h>
  51. #include <clib/diskfont_protos.h>
  52. #include <clib/icon_protos.h>
  53.  
  54. #define GT_FILETYPE     ((ULONG)'GTED') /* file identifier */
  55. #define GT_MAXLABEL     32L             /* max sourcelabel name */
  56. #define GT_MAXLABELNAME 80L             /* max gadget text */
  57. #define GT_VERSION      1L              /* file version */
  58. #define PR_VERSION      1L              /* prefs version */
  59.  
  60. #define GT_TITLE        ((UBYTE *)"GadToolsBox v1.0 © 1991")
  61.  
  62. /*
  63.  * --- This is the way NewGadget structures including it's
  64.  * --- TagItems are stored.
  65.  */
  66. struct ExtNewGadget {
  67.     struct ExtNewGadget *en_Next;       /* successor */
  68.     struct ExtNewGadget *en_Prev;       /* predecessor */
  69.     struct TagItem      *en_Tags;       /* NewGadget TagItems */
  70.     struct Gadget       *en_Gadget;     /* The created gadget */
  71.     struct NewGadget     en_NewGadget;  /* The NewGadget */
  72.     UBYTE                en_SourceLabel[GT_MAXLABEL+1];   /* Source label */
  73.     UBYTE                en_GadgetText[GT_MAXLABELNAME+1]; /* gadget text */
  74.     ULONG                en_SpecialFlags;  /* special internal flags */
  75.     UWORD                en_Kind;        /* NewGadget kind */
  76.     UWORD                en_NumTags;     /* Number of tagitems */
  77.  
  78.     /*** Specials for the string and integer gadgets ***/
  79.     LONG                 en_DefInt;      /* Default number */
  80.     UBYTE               *en_DefString;   /* Default string */
  81.     UWORD                en_MaxChars;    /* max # of chars */
  82.  
  83.     /*** Specials for the listview gadgets ***/
  84.     struct List          en_Entries;     /* entries in the listview */
  85.     UWORD                en_ScrollWidth; /* scroller width */
  86.     UWORD                en_Spacing;     /* spacing mx & listview */
  87.  
  88.     /*** Specials for the cycle and mx gadgets ***/
  89.     UBYTE               *en_Labels[25];  /* gadget labels max 25 for now */
  90.  
  91.     /*** Specials for the slider gadget ***/
  92.     UBYTE               *en_LevelFormat; /* slider format string */
  93.  
  94.     /*** Specials for the palette gadget ***/
  95.     UWORD                en_IndicatorSize; /* indicator size */
  96.  
  97.     /*** Specials for the scroller gadget ***/
  98.     UWORD                en_ArrowSize; /* arrow size */
  99. };
  100.  
  101. #define EGF_DISABLED     0x00000001     /* to indicate GA_Disabled tag */
  102. #define EGF_USERLABEL    0x00000002     /* to indicate a user label */
  103. #define EGF_CHECKED      0x00000004     /* to indicate checked state */
  104. #define EGF_READONLY     0x00000008     /* to indicate read listview */
  105. #define EGF_NOGADGETUP   0x00000010     /* to indicate no RelVerify */
  106. #define EGF_ISLOCKED     0x00000020     /* to indicate gadget locked */
  107. #define EGF_NEEDLOCK     0x00000040     /* to indicate gadget lock */
  108.  
  109. /*
  110.  * --- This is really a MinList structured for the ExtNewGadgets.
  111.  */
  112. struct ExtGadgetList {
  113.     struct ExtNewGadget *gl_First;   /* First in the list */
  114.     struct ExtNewGadget *gl_EndMark; /* End marker */
  115.     struct ExtNewGadget *gl_Last;    /* Last in the list  */
  116. };
  117.  
  118. /*
  119.  * --- This is the way the NewMenu structures are strored.
  120.  */
  121. struct ExtNewMenu {
  122.     struct ExtNewMenu   *em_Next;       /* successor */
  123.     struct ExtNewMenu   *em_Prev;       /* predecessor */
  124.     UBYTE                em_Bull0;      /* not used */
  125.     BYTE                 em_Bull1;      /* not used */
  126.     UBYTE               *em_NodeName;   /* used in listview */
  127.     struct NewMenu       em_NewMenu;    /* the NewMenu itself */
  128.     BYTE                 em_TheMenuName[GT_MAXLABELNAME+1]; /* Menu text */
  129.     ULONG                em_SpecialFlags; /* special internal flags */
  130.     struct ExtMenuList  *em_Items; /* this menu it's items */
  131.     BOOL                 em_Dummy; /* specify dummy item */
  132.     UBYTE                em_ShortCut[2]; /* keboard short-cut */
  133.     UWORD                em_NumSlaves; /* for binary file */
  134. };
  135.  
  136. #define EMF_HASDUMMY     0x00000001 /* this specifies menu has no items */
  137.  
  138. /*
  139.  * --- This is really a MinList structured for the ExtNewMenus.
  140.  */
  141. struct ExtMenuList {
  142.     struct ExtNewMenu   *ml_First;    /* First in the list */
  143.     struct ExtNewMenu   *ml_EndMark;  /* End marker */
  144.     struct ExtNewMenu   *ml_Last;     /* Last in the list */
  145. };
  146.  
  147. /*
  148.  * --- This data is written before all gadgets and/or menus.
  149.  */
  150. struct BinHeader {
  151.     /*** miscelanious info ***/
  152.     ULONG                bh_FileType;       /* file identification */
  153.     UWORD                bh_Version;        /* file version */
  154.     ULONG                bh_Flags0;         /* flags */
  155.     ULONG                bh_Flags1;         /* flags */
  156.     UWORD                bh_ActiveKind;     /* kind edited last */
  157.     UWORD                bh_SpareSlots[10]; /* future! */
  158.  
  159.     /*** Used font ***/
  160.     UBYTE                bh_FontName[80];   /* font name */
  161.     struct TextAttr      bh_Font;           /* used font */
  162.  
  163.     /*** Screen info ***/
  164.     UBYTE                bh_ScreenTitle[80]; /* screen title */
  165.     struct TagItem       bh_ScreenTags[13];  /* screen tags */
  166.     struct TagItem       bh_ScreenExt[10];   /* extended tags */
  167.     struct ColorSpec     bh_Colors[33];      /* color specs */
  168.     UWORD                bh_DriPens[NUMDRIPENS + 1]; /* screen dripens */
  169.     ULONG                bh_ScreenSpare[10]; /* future! */
  170.  
  171.     /*** Window info ***/
  172.     UBYTE                bh_WindowTitle[80]; /* window title */
  173.     struct TagItem       bh_WindowTags[14];  /* window tags */
  174.     struct TagItem       bh_WindowExt[10];   /* extended tags */
  175.     WORD                 bh_Zoom[4];         /* zoom positions */
  176.     UWORD                bh_MouseQueue;      /* max mouse queue */
  177.     UWORD                bh_RptQueue;        /* max key queue */
  178.     ULONG                bh_IDCMP;           /* user IDCMP */
  179.     ULONG                bh_Flags;           /* user flags */
  180. };
  181.  
  182. /*
  183.  * --- Binary file flags concerning window extended tags flags
  184.  */
  185. #define BHF_INNERWIDTH      0x00000001 /* WA_InnerWidth tag */
  186. #define BHF_INNERHEIGHT     0x00000002 /* WA_InnerHeight tag */
  187. #define BHF_ZOOM            0x00000004 /* WA_Zoom tag */
  188. #define BHF_MOUSEQUEUE      0x00000008 /* WA_MouseQueue tag */
  189. #define BHF_RPTQUEUE        0x00000010 /* WA_RptQueue tag */
  190. #define BHF_AUTOADJUST      0x00000020 /* WA_AutoAdjust tag */
  191.  
  192. /*
  193.  * --- Binary file flags concerning screen extended tags flags
  194.  */
  195. #define BHF_AUTOSCROLL      0x00010000 /* SA_AutoScroll tag */
  196. #define BHF_WBENCH          0x00020000 /* source uses workbench screen */
  197. #define BHF_PUBLIC          0x00040000 /* source uses def. public screen */
  198. #define BHF_CUSTOM          0x00080000 /* custom screen */
  199.  
  200. /*
  201.  * --- The preferences structure. This data will definitly
  202.  * --- change!!!!!
  203.  */
  204. struct Prefs {
  205.     UWORD                pr_Version;        /* prefs version */
  206.     ULONG                pr_PrefFlags0;     /* flags */
  207.     ULONG                pr_PrefFlags1;     /* flags */
  208.     UWORD                pr_CountIDFrom;    /* Begin ID count from this */
  209.     UBYTE                pr_ProjectPrefix[5];  /* Label prefix */
  210.    /*
  211.     struct ColorSpec     pr_Colors[33];
  212.     */
  213. };
  214.  
  215. #define PRF_STATIC       0x00000001         /* generate static structures */
  216. #define PRF_RAW          0x00000002         /* generate raw assem source */
  217. #define PRF_COORDS       0x00000004         /* coordinates */
  218. #define PRF_WRITEICON    0x00000008         /* write icon */
  219.  
  220. /*
  221.  * --- A special node to use with ListView gadgets. This structure has
  222.  * --- four 32-bit slots for extra data plus 100 bytes for the node name.
  223.  */
  224. struct ListViewNode {
  225.     struct ListViewNode *ln_Succ;   /* successor */
  226.     struct ListViewNode *ln_Pred;   /* predecessor */
  227.     UBYTE                ln_Type;   /* bull */
  228.     BYTE                 ln_Pri;    /* bull */
  229.     char                *ln_Name;   /* points to ln_NameBytes[0] */
  230.     ULONG                ln_UserData[4];  /* userdata slots */
  231.     UBYTE                ln_NameBytes[100]; /* the node name */
  232. };
  233.